<template>
  <svg class="svg-icon" aria-hidden="true" :style="{ fontSize: _fontSize }">
    <use :xlink:href="'#' + _iconClass"></use>
  </svg>
</template>

<script lang="ts" setup>
  import { defineProps } from 'vue'
  import useProp from '@/hooks/use-prop'
  defineProps<{
    iconClass: string
    fontSize?: string
  }>()
  const _iconClass = useProp('iconClass')
  const _fontSize = useProp('fontSize')
</script>

<style>
  .svg-icon {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    fill: currentColor;
    overflow: hidden;
  }
</style>
